//
//  NSData+YC.h
//  YCSchool
//
//  Created by yanglinxia on 16/4/26.
//  Copyright © 2016年 yanglinxia. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CommonCrypto/CommonCryptor.h>

@interface NSData (YC)

/** des解密 */
- (NSData *)yc_decryptWithKey:(NSString *)key iv:(NSString *)iv;
/** des加密 */
- (NSData *)yc_encryptWithKey:(NSString *)key iv:(NSString *)iv;

- (NSData *)yc_crypto:(CCOperation)operation  key:(const char *)key iv:(const char *)iv;

- (NSString *)yc_hexStringOfData;

- (NSData *)yc_crypto3des:(CCOperation)operation  key:(const char *)key iv:(const char *)iv;

- (NSData *)yc_RSADecryptWithPublicKeyRef:(SecKeyRef)keyRef;

- (NSData *)yc_RSAEncryptWithPublicKeyRef:(SecKeyRef)keyRef;

- (NSData *)yc_AES256EncryptWithKey:(NSString *)key;

- (NSData *)yc_AES256DecryptWithKey:(NSString *)key;

- (NSString *)yc_utf8String;

@end
